<?php
namespace Products\Model;

class History
{
	public $h_id;
	public $id;
	public $date;
	public $status;
	public $type;
	public $updatenote;
	
	public function exchangeArray($data){
	
		$this->h_id            = (isset($data['h_id']))         ? $data['h_id']  : null;
		$this->buy_id       = (isset($data['id']))    ? $data['id']	  : null;		
		$this->date        = (isset($data['date']))     ? $data['date']  : null;		
		$this->status           = (isset($data['status']))        ?     $data['status']  : null;		
		$this->type           = (isset($data['type']))        ?     $data['type']  : null;		
		$this->updatenote           = (isset($data['updatenote']))        ?     $data['updatenote']  : null;		
			
	}

	// Add the following method:
	public function getArrayCopy()
	{
		return get_object_vars($this);
	}

}